package thread;

public class demo11 {
    public static void main(String[] args) throws InterruptedException {
        Thread t1=new Thread(()->{
            try {
                Thread.sleep(1000*10);
                System.out.println("线程1执行");
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        },"线程1");
        Thread t2=new Thread(()->{
            try {
                Thread.sleep(1000*10);
                System.out.println("线程2执行");
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        },"线程2");
        t1.start();
        ///t2.start();
        System.out.println("mian线程结束");
    }
}
